package com.gxa.modules.mapper.propertymapper;

import com.gxa.modules.pojo.Guards;
import com.gxa.modules.pojo.GuardsAlarm;
import com.gxa.modules.pojo.GuardsPatrol;
import com.gxa.modules.pojo.VisitorRegister;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CarBarrierMapper {
    /**
     * 车辆查询
     */

    List<Guards> selectGuards(@Param("index") int index,
                              @Param("size") int size,
                              @Param("deviceName")String device_name,
                              @Param("deviceId")String device_id,
                              @Param("guardsType")String guards_type);
    int selectGuardssum(@Param("index") int index,
                        @Param("size") int size,
                        @Param("deviceName")String device_name,
                        @Param("deviceId")String device_id,
                        @Param("guardsType")String guards_type);


    /**
     * 添加门禁设备
     */
    int addGuards(Guards guards);

    /**
     * 根据id修改门禁状态
     */
    int updateGuardsType(int guardsTypeId,int id);


    /**
     * 删除门禁设备
     */
    int deleteGuardsById(String id);

    void batchDelete(List<Integer> list);

    /**
     * 门禁报警查询
     */
    List<GuardsAlarm> selectGuards_alarm(@Param("page") int index,
                                         @Param("size") int size,
                                         @Param("deviceName")String device_name,
                                         @Param("deviceId")String device_id,
                                         @Param("guardsAlarmType")String guards_alarm_type);
    int selectGuards_alarmsum(@Param("page") int index,
                              @Param("size") int size,
                              @Param("deviceName")String device_name,
                              @Param("deviceId")String device_id,
                              @Param("guardsAlarmType")String guards_alarm_type);
    /**
     * 删除门禁报警设备
     */
    int deleteGuards_alarmById(String id);

    /**
     * 门禁巡视
     */
    List<GuardsPatrol> selectGuards_patrol(@Param("index") int index,
                                           @Param("size") int size,
                                           @Param("deviceName")String device_name,
                                           @Param("deviceId")String device_id,
                                           @Param("patrolType")String patrol_type);


    int selectGuards_patrolSum(@Param("index") int index,
                               @Param("size") int size,
                               @Param("deviceName")String device_name,
                               @Param("deviceId")String device_id,
                               @Param("patrolType")String patrol_type);

    /**
     * 根据id删除门禁巡视
     * @param id
     * @return
     */
    int deleteGuards_patrolById(String id);

}
